﻿

CREATE PROCEDURE [dbo].[resuma_GetLuniSuspendare]
	-- Add the parameters for the stored procedure here
	@IDPersoana int, 
	@LuniSusp int OUT
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	SET @LuniSusp = 0
    SELECT @LuniSusp = SUM(DATEDIFF(month,DeLaData,PanaLaData)) FROM [PersoaneSuspCM]
    WHERE IDPersoana = @IDPersoana
END